package cn.ssm.service.serviceImpl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.ssm.dao.UserMapper;
import cn.ssm.pojo.User;
import cn.ssm.service.UserService;

/**
 * 查询所有用户账户信息
 * @author 戴峥嵘
 *
 */
@Service
public class UserServiseImpl implements UserService{
	@Autowired
	UserMapper userMapper;
	
	 @Override
	public List<User> getUserList(){
		return userMapper.getUserList();
	}
	
	

	public User getUser(Object userName, String password) {
		return userMapper.getUser(userName, password);
	}



	@Override
	public int addUser(String userName, String password) {
		return userMapper.addUser(userName,password);
	}
	
	//根据username查昵称nickName
	@Override
	public List<User> getUserListByUserName(String phone) {
		return userMapper.getUserListByUserName(phone);
	}

	/**
	 * 添加用户
	 */
	public int addUsers(User user) {
		return userMapper.addUsers(user);
	}



	@Override
	public List<User> selectUser(User user) {
		return userMapper.selectUser(user);
	}



	//<!-- 获取每月用户增加量   黄少涛 -->
	@Override
	public List<String> getUserMonthDate() {
		
		return userMapper.getUserMonthDate();
	}


	@Override
	public int updatePic(Map<String, Object> map) {
		return userMapper.updatePic(map);
	}



	@Override
	public List<User> getAllUserList(Map<String, Object> paramas) {
		return userMapper.getAllUserList(paramas);
	}



	@Override
	public int getUserCount() {
		return userMapper.getUserCount();
	}



	@Override
	public int deleteUserList(Integer id) {
		return userMapper.deleteUserList(id);
	}



	@Override
	public User selectPhone(String phone) {
		
		return userMapper.selectPhone(phone);
	}




}
